
<%@ Page Language="C#" MasterPageFile="~/site.master" 
AutoEventWireup="true" 
CodeFile="CargaMasiva.aspx.cs" 
Inherits="Profesores_CargaMasiva" 
Title="Carga Masiva" 

%>

<%@ Register Src="../Controles/cboNumerico.ascx" TagName="cboNumerico" TagPrefix="uc2" %>
<%@ Register Src="../Controles/HeaderPopUp.ascx" TagName="HeaderPopUp" TagPrefix="uc1" %>
<%@ Register Src="../Controles/CboGeneric.ascx" TagName="CboGeneric" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContainer" Runat="Server">
    <uc1:HeaderPopUp ID="HeaderPopUp1" runat="server" />
    <table>
        <tr>
            <td style="width: 105px">
                Modalidad</td>
            <td style="width: 243px">
                <uc3:CboGeneric ID="CboModalidad" runat="server" EnableViewState="true" />
                </td>
            <td style="width: 135px">
                Nota Nro:<asp:DropDownList ID="cboNroNota" runat="server" CssClass="input-text"  AutoPostBack="true" Width="50px" OnSelectedIndexChanged="cboNroNota_SelectedIndexChanged" >
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                </asp:DropDownList></td>
               <td><asp:Button ID="actualizar" runat="server" CssClass="input-button" Text="Actualizar" /></td>
        </tr>
        <tr>
            <td style="width: 105px">
                Comentario Gral:</td>
            <td colspan="2">
                <asp:TextBox ID="txtObservacion" runat="server" Width="377px"></asp:TextBox></td>
        </tr>
    </table>
    
    <div id="botBar"  runat="server" style="background:gray; text-align:right; display:none;">
    <asp:Button ID="Button2" runat="server" CssClass="input-button" OnClick="cmdGuardar_Click"
            Text="Guardar" />
    <asp:Button ID="Button1" runat="server" CssClass="input-button" OnClick="cmdVolver_Click"
            Text="Volver" />
    </div>
    
    
        <asp:GridView ID="GridView1" 
        runat="server" AutoGenerateColumns="False" OnDataBound="GridView1_DataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
        OnRowDataBound="GridView1_RenderRow"
         >
        <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID"/>
        <asp:BoundField DataField="Alumno" HeaderText="Alumno" />
            <asp:TemplateField HeaderText="Nota1"    >
                <ItemTemplate>
                <uc2:cboNumerico id="CboNumerico1" runat="server"
                     Selected='<%# Bind("Nota0") %>'
                     Enabled ='<%# (cboNroNota.SelectedValue=="1")%>'
                     visible ='<%# (cboNroNota.Items.Count>=1) %>'
                     >
                    </uc2:cboNumerico>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Nota2"  >
                <ItemTemplate>
                    <uc2:cboNumerico id="CboNumerico2" runat="server"
                     Selected='<%# Bind("Nota1") %>'
                     Enabled ='<%# (cboNroNota.SelectedValue=="2")%>'
                     visible ='<%#(cboNroNota.Items.Count>=2) %>'
                     >
                    </uc2:cboNumerico>
                    
                </ItemTemplate>
            </asp:TemplateField>
                        <asp:TemplateField HeaderText="Nota3"  >
                <ItemTemplate >
                    <uc2:cboNumerico id="CboNumerico3" runat="server"
                     Selected='<%# Bind("Nota2") %>'
                     Enabled ='<%# (cboNroNota.SelectedValue=="3")%>'
                     visible ='<%#(cboNroNota.Items.Count>=3) %>'
                     >
                    </uc2:cboNumerico>
                    
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Nota4"  >
                <ItemTemplate>
                    <uc2:cboNumerico id="CboNumerico4" runat="server"
                     Selected='<%# Bind("Nota3") %>'
                     Enabled ='<%#(cboNroNota.SelectedValue=="4")%>'
                     visible ='<%#(cboNroNota.Items.Count>=4) %>'
                     >
                    </uc2:cboNumerico>
                    
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Nota5"  >
                <ItemTemplate>
                    <uc2:cboNumerico id="CboNumerico5" runat="server"
                     Selected='<%# Bind("Nota4") %>'
                     Enabled ='<%#(cboNroNota.SelectedValue=="5")%>'
                     visible ='<%#(cboNroNota.Items.Count>=5) %>'
                     >
                    </uc2:cboNumerico>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Nota6"  >
                <ItemTemplate>
                    <uc2:cboNumerico id="CboNumerico6" runat="server"
                     Selected='<%# Bind("Nota5") %>'
                     Enabled ='<%#(cboNroNota.SelectedValue=="6")%>'
                     visible ='<%#(cboNroNota.Items.Count>=6) %>'
                     >
                    </uc2:cboNumerico>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Comentario Individual">
                <ItemTemplate>
                    <asp:TextBox ID="TxtObervacion" runat="server" Text='<%# Bind("Observacion") %>' Width="312px"  ></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        </asp:GridView>
<div id="butBar2" runat="server" style="display:none; background:gray; text-align:right;">
    <asp:Label ID="lblMensaje" runat="server"></asp:Label>
    <asp:Button ID="Button3" runat="server" CssClass="input-button" OnClick="cmdGuardar_Click"
            Text="Guardar" />
    <asp:Button ID="Button4" runat="server" CssClass="input-button" OnClick="cmdVolver_Click"
            Text="Volver" />
    </div>
    </asp:Content>

